package com.iatinspur;

import com.sun.nio.zipfs.ZipDirectoryStream;

/**
 * java -Djava.ext.dirs="D:\rjbao\JDK\jdk\jre\lib\ext;C:\Users\huangjian01\Desktop\jvmtest" -classpath C:/Users/huangjian01/Desktop/class-loader-test.jar com.iatinspur.ExtLoaderClass a
 */
public class ExtLoaderClass {

    /**
     * ZipDirectoryStream 中得是ext目录下得jar包类
     * 所以下面得输出 sun.misc.Launcher$ExtClassLoader@677327b6
     * @param args
     */
    public static void main(String[] args) {
        System.out.println(ZipDirectoryStream.class.getClassLoader());
        try {
            Class<?> aClass = Class.forName("com.iatinspur.classloader.Test");
            System.out.println(aClass.getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }

     //  System.out.println(ZipDirectoryStream.class.getClassLoader());
    }
}
